<?php

namespace App\Http\Requests\Member;

use App\Http\Requests\Request;

class UpdateMemberRequest extends Request
{
    /**
     * 验证通过
     *
     * @return bool
     */

    public function authorize()
    {
        return true;
    }

    /**
     * 验证规则
     *
     * @return array
     */
    public function rules()
    {
        return [
            'room_id' => 'required',
            'username' => 'required|max:6',
        ];
    }

    /**
     * 自定义验证
     *
     * @return array
     */
    public function messages()
    {
        return [
            'room_id.required'=>'房间号不能为空',
            'username.required'=>'入住用户不能为空',
            'username.max'=>'字数不能大于6',


        ];
    }

}
